/* * @Author: wangsh  * @Date: 2019-06-23 20:03:22  */
import React from 'react';
import { Card, Row, Col } from 'antd';
import EchartsPie from './pie';
import EchartsBar from './bar';

// 数据分类
const mainData = ['天海湾', '鼎龙湾', '珍珠湾', '翠逸家园', '紫林湾'];
// 显示数据值
const mainValue = [
  { value: 1548, name: '天海湾' },
  { value: 510, name: '鼎龙湾' },
  { value: 338, name: '珍珠湾' },
  { value: 265, name: '翠逸家园' },
  { value: 220, name: '紫林湾' }
];


const Echarts = () => {
  return (
    <div>
      <Row gutter={16}>
        <Col xs={24} sm={24} md={12}>
          <Card title="饼图">
            <EchartsPie mainData={mainData} mainValue={mainValue} />
          </Card>
        </Col>
        <Col xs={24} sm={24} md={12}>
          <Card title="柱图">
            <EchartsBar mainData={mainData} mainValue={mainValue} />
          </Card>
        </Col>
      </Row>
    </div>
  );
};

export default Echarts;
